package cn.larry.tools.easypay;

import cn.larry.tools.easypay.bean.ChannelPayBean;
import cn.larry.tools.easypay.bean.EasyPayBean;

/**
 * Larry
 * 2021/8/24 23:08
 * 易生支付
 *
 * @Version 1.0
 */
public interface EasyPayService {

    /**
     * 支付预下单
     *
     * @param easyPayBean
     * @param tradeamt    订单金额（分）
     * @param payId       交易请求流水号
     * @param openid      微信用户ID
     * @param reqIp      支付请求IP
     * @return 支付标识：prepayId
     */
    public ChannelPayBean createPay(EasyPayBean easyPayBean,
                                    String tradeamt, String payId, String openid, String reqIp) throws Exception;

    /**
     * 交易查询
     *
     * @param easyPayBean
     * @param payId 交易请求流水号
     * @return
     */
    public ChannelPayBean queryPay(EasyPayBean easyPayBean,String payId) throws Exception;

    /**
     * 当日交易撤销
     *
     * @param easyPayBean
     * @param oriPayId 原交易请求流水号
     * @return
     */
    public ChannelPayBean cancelPay(EasyPayBean easyPayBean,String oriPayId) throws Exception;

}
